//api进行统一管理
import requests from "@/api/ajax";
// import mockRequest from './mockAjax';

//注册
export const reqUserRegister = (data)=>requests({url:'/register',data,method:'post'});

//登录
// export const reqUserLogin = (data)=>requests({url:'/user/passport/login',data,method:'post'});
export const reqUserLogin = (data)=>requests({url:'/login',data,method:'post'});

//与rasa交互对话
export const reqChatRasa = (data)=>requests({url:'/rasaChat',data,method:'post'});

//获取具体video信息
export const reqGetVideoDetail = (vod_id)=>requests({url:`/video?vid=${vod_id}`,method:'get'});

//获取VideoList
export const reqGetVideoList = (disease)=>requests({url:`/videos?disease=${disease}`,method:'get'});

//获取用户信息【需要带着用户的token向服务器要用户信息】
export const reqUserInfo = ()=>requests({url:'/userInfo',method:'get'});

//获取用户信息【需要带着用户的token向服务器要用户信息】
export const reqCategoryList = ()=>requests({url:'/departments',method:'get'});

//增加热度
export const reqAddHot = (entity)=>requests({url:`/addHot/?entity=${entity}`,method:'get'});

//获取热门问答
export const reqHotQuestions = (countEntity,countQuestion)=>requests({url:`/hotQuestions?countEntity=${countEntity}&countQuestion=${countQuestion}`,method:'get'});

//获取实体、问答
export const reqEntityQuestions = (entity,countQuestion)=>requests({url:`/hotQuestionsWithSingleEntity?entity=${entity}&countQuestion=${countQuestion}`,method:'get'});

//获取实体、问答
export const reqQuestionByMid = (mid)=>requests({url:`/getQuestion?mid=${mid}`,method:'get'});

//获取最佳回复
export const reqGoodResponse = (count)=>requests({url:`/goodResponses?count=${count}`,method:'get'});

//AIChatGpt35
export const reqChatGpt35 = (data)=>requests({url:'/chatGpt35',data,method:'post'});
//AIChatGpt3
export const reqChatGpt3 = (data)=>requests({url:'/chatGpt3',data,method:'post'});
//AIChatAI
export const reqChatAI = (data)=>requests({url:'/chatAI',data,method:'post'});

//
//分页获取问答
export const reqGetMessages = (current,limit)=>requests({url:`manage/messages/${current}/${limit}/0`,method:'get'})
//分页获取问答ByGood
export const reqGetMessagesByGood = (current,limit)=>requests({url:`manage/messages/${current}/${limit}/1`,method:'get'})
//分页获取user
export const reqGetUsers = (current,limit)=>requests({url:`manage/users/${current}/${limit}`,method:'get'})
//修改用户数据
export const reqUpdateUser = (data)=>requests({url:'manage/user/',data,method:'post'})
//修改对话数据
export const reqUpdateMessage = (data)=>requests({url:'manage/message/',data,method:'post'})

//分页获取Ip
export const reqGetIp = (current,limit)=>requests({url:`manage/ips/${current}/${limit}`,method:'get'})
//修改ip数据
export const reqUpdateIp = (data)=>requests({url:'manage/ip/',data,method:'post'})

//分页获取Hot
export const reqGetHot = (current,limit)=>requests({url:`manage/hots/${current}/${limit}`,method:'get'})
//修改Hot数据
export const reqUpdateHot = (data)=>requests({url:'manage/hot/',data,method:'post'})

//根据uid获取Message
export const reqGetMessageByUid = (current,limit,uid)=>requests({url:`messagesByUid/${current}/${limit}/${uid}`,method:'get'})

//根据uid获取Message
export const reqGetDiseaseList = (name)=>requests({url:`disease/${name}`,method:'get'})

//更新message
// export const reqUpdateMessage = (data)=>requests({url:'manage/hot/',data,method:'post'})
//
// //退出登录
// //URL:/api/user/passport/logout  get
// // export const reqLogout = ()=> requests({url:'/user/passport/logout',method:'get'});
//
